//创建一个模型
const mongoose = require("mongoose")

const Schema = mongoose.Schema

//限制模型
const UserType = {
    username: String,
    password: String,
    age: Number,
    avatar: String
}

const UserModel = mongoose.model("user", new Schema(UserType))
//模型user 将会对应users 集合
module.exports = UserModel